home *** CD-ROM | disk | FTP | other *** search
- /*
- * ThreadedSnakes.h
- *
- * Author: Brad Post
- * Creation Date: 12/16/92
- * Copyright © 1992, 1993 Apple Computer Inc.
- *
- * This file contains all the header information to be used by the two files to do snakes.
- *
- */
-
- #include <Dialogs.h>
- #include <Fonts.h>
- #include <QDOffscreen.h>
- #include <Errors.h>
- #include <Events.h>
- #include <Quickdraw.h>
- #include <Resources.h>
- #include <Windows.h>
- #include <Memory.h>
- #include <Menus.h>
- #include <stdlib.h>
- #include <Threads.h>
- #include <ToolUtils.h>
- #include <OSEvents.h>
- #include <Desk.h>
- #include <DiskInit.h>
- #include "ThreadUtil.h"
-
- /* 1.01 - kTopLeft - This is for positioning the Disk Initialization dialogs. */
- #define kDITop 0x0050
- #define kDILeft 0x0070
-
- #define MBarHeight 20 // needed to determine the size of the window
-
- #define aboutALRT 1001 // about box
- #define appleMenuID 1
- #define fileMenuID 1001 // my file menu
- #define fileMenu 1
- #define fmQuit 1
- #define errorALRT 1002 // alert dialog
-
- #define notDONE 0 // not finished, so don't quit
- #define areDONE 1 // we're finished so we can quit away
-
- typedef short VEC[2]; // an X & Y coord, why didn't I just use Pt ... don't ask.... :-)
-
- typedef struct {
- VEC pos; // position
- VEC vel; // velocity
- int length; // length of snake
- int numOfMoves; // number of moves
- ThreadStyle whatStyle; // preemtive or cooperative
- RGBColor whatColor; // what color to paint
- } SNAKE_ARGS;
-
- extern VEC theBounds;
- extern SNAKE_ARGS snake1;
- extern SNAKE_ARGS snake2, snake3, snake4, snake5;
-
- /*
- * Function prototypes go here.
- */
- extern void initSnakes();
- extern myError(Str255);
- extern void cleanUpSnakes();